Add an Expression
You can enter variable strings as an expression.
For example, if you want to add together two integer variables, follow these steps:
- Click the Add symbol to open the PLC"Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events Variable Selector
- Choose a variable, but do not click OK yet
(the variable is added to the expression field where you can do any required editing) - Select the Ins option
(this option allows you to insert the next selected variable at the current cursor position in the expression edit field) - Press the PLUS SIGN (+) in the expression field
- Select another variable
- Click the OK button
- Then the expression is displayed into the watch window
Figure 3-19: Watch Window - Creating Expression
What you can include in a complex expression:
- Index of array
- Comparison “>”, “<”, “<>”, “=”
- Operator “+”, “*”, “-“, “/”
Please note that the DIVIDE SIGN (/) is not interpreted as an operator when used with prefixed variables (e.g. MachineLogic/lastTravelSpeed)